import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import Cart from '@/components/cart/Cart'
import ProductList from '@/components/product/ProductList'
// import temp from '@/components/product/temp'
import Category from '@/components/category/Category'
import User from '@/components/User'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld,
      children: [{
        path: 'category',
        name: 'category',
        component: Category,
        children: [
          {
            path: ':categoryId',
            name: 'ProductList',
            component: ProductList,
          },

        ]
      },
      {
        path: 'cart',
        name: 'cart',
        component: Cart
      },
      {
        path: 'user',
        name: 'user',
        component: User
      },
      ]
    },

  ]
})
